/*SSVRjXkgvV55TIxKIO0zVzSkfDk5DdTUU1NkKDKy5OPH8BrE9PMqRF1vZnra6W8Z*/
import { ajax, toast, promptBox } from 'nc-lightapp-front';
import { formulamsgHint, bodyAfterEventRenderData } from '../../components/afterEventPub/afterEventPubDeal';
import { currentTypeAfterFormEvents } from '../../components/pubUtils/currentTypeAfterEvent';
import { checknoDisplayAfterEvent, checktypeAfterEvent } from '../../components/pubUtils/specialFieldAfterEvent.js';


function onBatchChange(param) {
    let self = this;
    let { areaCode, column, newValue, changedrows, allData, currentIndex, pasteData } = param;
    let attrcode = column.attrcode;
    let newRows = [];
    let queryCondition = {}
    let isManyCondition = true //业务组判断，每行参照过滤条件是否不一样，如果不一样，值为true
    let indexs = [];
    let pk_accasoa='';
    if(column.refcode=="uapbd/refer/fiacc/AccountDefaultGridTreeRef/index"){//会计科目档案
        pk_accasoa= allData[0].values[attrcode].value;
    }
    for (let i = 0; i < newValue.length; i++) {
        let isExit = false;
        allData.forEach((item,index)=> {
            if(newValue[i].rowid&&newValue[i].rowid === item['rowid']){
                isExit = true;
                newRows[i] = cloneObjectFn(allData[index]);
            }
        })
        if(!isExit){
            newRows[i] = cloneObjectFn(newValue[0]);
        } 
        if (allData[i] && allData[i].values && allData[i].values[attrcode]) {
            newRows[i].values[attrcode] = newValue[i].values[attrcode];
            newRows[i].rowid = newValue[i].rowid;
            newRows[i].rowId = newValue[i].rowId;
            newRows[i].key = newValue[i].key;
            newRows[i].status =  newValue[i].status;
            newRows[i].dataIndex = i+currentIndex;
            newRows[i].leafIndex = i+currentIndex;
            newRows[i].viewIndex = i+currentIndex;
            
            indexs.push(i+currentIndex)
            //若为参照
            if (column.itemtype === 'refer' && isManyCondition) {
                // 每行参照过滤条件是不一样
                // newRows[i].queryCondition = { pk_org: allData[i].values.pk_org.value }

                setQueryCondition(self, newRows[i], allData[i], self.props, areaCode, attrcode,column,pk_accasoa)

            }
        }else{
            //增的行大于 现有的行
            newRows[i].rowid = newValue[i].rowid;
            newRows[i].rowId = newValue[i].rowId;
            newRows[i].key = newValue[i].key;
            newRows[i].dataIndex = i+currentIndex;
            newRows[i].leafIndex = i+currentIndex;
            newRows[i].viewIndex = i+currentIndex;
            newRows[i].status =  newValue[i].status;
            indexs.push(i+currentIndex);
        }
    }
    //调用平台方法，更新数据
    self.props.cardTable.updateAfterBatchChange({
        areaCode,
        column,
        queryValue: newRows,
        changedrows,
        pasteData,
        indexs, //过滤后的index的数组例如：[0,1,2,3,5]
        queryCondition, //如果是参照且参照过滤条件唯一就传，不一致就是前面说的，放到newData里
        isManyCondition,// true，代表有多个参照过滤条件，false表示只有一个
    }).then((res) => {
        let { props, changedrows, indexs, key } = res

        //票据类型
        if (key == 'checktype') {
            for (let i = 0; i < newRows.length; i++) {
                checktypeAfterEvent(props, areaCode, key, allData[i + currentIndex].values[attrcode], i + currentIndex);
            }
        }
        //非元数据字段，票据号
        if (key == 'checkno_display') {
            for (let i = 0; i < newRows.length; i++) {
                checknoDisplayAfterEvent(props, areaCode, key, allData[i + currentIndex].values[attrcode], i + currentIndex);
            }
            key = 'checkno';
        }

        //执行业务的批量编辑后事件
        afterEvent(self, props, areaCode, key, newRows, changedrows, indexs);
    });

}
 function cloneObjectFn (obj){ // 对象复制
    return JSON.parse(JSON.stringify(obj))
}

function afterEvent(self, props, moduleId, key, value, changedrows, indexs) {
    let that = self
    let pagecode = that.getPagecode()
    ajax({
        url: '/nccloud/arap/arappub/bodybatchedit.do',
        data: {
            billtype: that.billType,
            rowindex: 0,
            editindexs: indexs,
            pageId: pagecode,
            changedrows: changedrows,
            tableId: moduleId,
            bodys: props.cardTable.getRowsByIndexs(moduleId, indexs),
            formEvent: props.createFormAfterEventData(pagecode, that.formId, that.tableId, key, value),
            uiState: that.props.getUrlParam('status')
        },
        async: false,
        success: (res) => {
            //渲染数据
            bodyAfterEventRenderData(that, res);

            if (that.props.getUrlParam('type') == 'transfer') {
                that.synTransferData();
            }
            //表体改变表头税率编辑性
            if (i == 0 && key == 'pk_currtype') {
                //v2111 汇率控制发生变化，都走编辑前进行控制 currentTypeAfterFormEvents(that.formId, props, 'pk_currtype');
            }
            //编辑公式提示
            formulamsgHint(that, res);
        },
        error: (res) => {

        }
    });
}


function setQueryCondition(that, newRow, record, props, moduleId, attrcode,column,pk_accasoa) {
    var noFilterFields = ["money_bal", "money_de", "money_cr", "notax_de", "notax_cr", "occupationmny", "nosubtax", "nosubtaxrate", "local_money_bal", "local_money_de", "local_money_cr",
        "local_notax_de", "local_notax_cr", "local_tax_de", "local_tax_cr", "groupbalance", "groupdebit", "groupcrebit", "groupnotax_de", "groupnotax_cre", "groupagentreceivelocal",
        "grouptax_de", "grouptax_cre", "globalbalance", "globaldebit", "globalcrebit", "globalnotax_de", "globalnotax_cre", "globalagentreceivelocal", "globaltax_de", "globaltax_cre",
        "price", "taxprice", "postprice", "postpricenotax", "local_price", "local_taxprice", 'taxrate', 'taxtype', "quantity_bal"]//, "subjcode"
    if (noFilterFields.indexOf(attrcode) > -1) {
        return
    }
    
    var billType = that.formId && props.form.getFormItemsValue(that.formId, 'pk_billtype') ? props.form.getFormItemsValue(that.formId, 'pk_billtype').value : null;
    let key=attrcode;
    switch (attrcode) {
        case 'pk_org'://财务组织
            newRow.queryCondition = () => {
                //查询条件不写成数组，而是取核算账簿数组的第一个
                return {
                    "AppCode": props.getSearchParam('c'),
                    "DataPowerOperationCode" : 'fi',
                    "TreeRefActionExt": 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'pk_org_v'://财务组织版本
            newRow.queryCondition = (p) => {
                return{
                    'DataPowerOperationCode' :'fi',
                    'AppCode' : props.getSearchParam('c'),
                    'VersionStartDate' : props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null,
                    'TreeRefActionExt' : 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'pk_fiorg'://废弃财务组织
            newRow.queryCondition = (p) => {
                return{
                    'DataPowerOperationCode' : 'fi',
                    'AppCode' : props.getSearchParam('c'),
                    'TreeRefActionExt' : 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'pk_fiorg_v'://废弃财务组织
            newRow.queryCondition = (p) => {
                return {
                    'DataPowerOperationCode' : 'fi',
                    'AppCode' : props.getSearchParam('c'),
                    'VersionStartDate' : props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null,
                    'TreeRefActionExt' : 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'sett_org'://结算财务组织
            newRow.queryCondition = (p) => {
                return{
                    'DataPowerOperationCode' : 'fi',
                    'AppCode' : props.getSearchParam('c'),
                    'TreeRefActionExt' : 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'sett_org_v'://结算财务组织
            newRow.queryCondition = (p) => {
                return{
                    'DataPowerOperationCode' : 'fi',
                    'AppCode' : props.getSearchParam('c'),
                    'VersionStartDate' : props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null,
                    'TreeRefActionExt' : 'nccloud.web.refer.sqlbuilder.PrimaryOrgSQLBuilder'
                }
            }
            break;
        case 'scomment'://摘要
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'material'://物料
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.matcustcode = record.values.matcustcode ? record.values.matcustcode.value : null;//物料客户码，应收模块需要传值
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return condition;
            }
            break;
        case 'matcustcode'://物料
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.pk_customer = record.values.customer ? record.values.customer.value : null;//客户
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return condition;
            }
            break;
        case 'pk_payterm'://付款协议(根据财务组织)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return condition;
            }
            break;
        case 'supplier'://供应商
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                //付款单和应付单
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'customer'://客户
            newRow.queryCondition = (p) => {
                let condition={};
                //收款单和应收单
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'pk_deptid'://部门
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'pk_deptid_v'://部门版本
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return condition;
            }
            break;
        case 'pk_psndoc'://业务员
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'taxcodeid'://税码(根据报税国和购销类型)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.TaxcodeIdSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.TaxcodeIdSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.TaxcodeIdSqlBuilder';
                }
                condition.itemKey = key;
                condition.taxcountryid = props.form.getFormItemsValue(that.formId, 'taxcountryid') ? props.form.getFormItemsValue(that.formId, 'taxcountryid').value : null;//报税国
                condition.buysellflag = record.values.buysellflag ? record.values.buysellflag.value : null;//购销类型
                condition.pk_org = record.values.pk_org.value;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pu_deptid'://业务部门
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.condition.busifuncode = 'all';
                condition.pk_org = record.values.pu_org ? record.values.pu_org.value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pu_deptid_v'://业务部门
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.pk_org = record.values.pu_org ? record.values.pu_org.value : null;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pu_psndoc'://业务人员
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.pk_org = record.values.pu_org ? record.values.pu_org.value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1") {
                    condition.DataPowerOperationCode = 'fi';
                }
                return condition;
            }
            break;
        case 'cashitem'://现金流量项目
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org ? record.values.pk_org.value : null;
                return condition;
            }
            break;
        case 'pk_subjcode'://收支项目
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org ? record.values.pk_org.value : null;
                return condition;
            }
            break;
        case 'payaccount'://付款银行账户
            // if (billType == 'F0' || billType == 'F2' || billType == "23E0") {
            //     var objtypeValue = record.values.objtype;
            //     if (objtypeValue.value == "1") {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pub/CustBankAccGridRef/index'
            //         item.refName = that.state.json['public-000147']/* 国际化处理： 供应商银行账户*/
            //     } else if (objtypeValue.value == "3") {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pubinfo/PsnbankaccGridRef/index'
            //         item.refName = that.state.json['public-000148']/* 国际化处理： 个人银行账户*/
            //     } else {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pub/CustBankAccGridRef/index'
            //         item.refName = that.state.json['public-000149']/* 国际化处理： 客户银行账户*/
            //     }
            // }
            newRow.queryCondition = (p) => {
                let condition={};
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "23E1") {
                    //付款单和应付单
                    if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                        }
                    } else {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                    }

                    condition.itemKey = key;
                    condition.DataPowerOperationCode = 'fi';
                    condition.refnodename = that.state.json['public-000150'];/* 国际化处理： 使用权参照*/
                    condition.pk_org = props.form.getFormItemsValue(that.formId, 'pk_org') ? props.form.getFormItemsValue(that.formId, 'pk_org').value : null;
                    condition.pk_currtype = record.values.pk_currtype ? record.values.pk_currtype.value : null;

                } else {
                    var objtypeValue = record.values.objtype.value;
                    var supplier_1 = record.values.supplier ? record.values.supplier.value : null;
                    var customer_1 = record.values.customer ? record.values.customer.value : null;
                    let psndoc = record.values.pk_psndoc ? record.values.pk_psndoc.value : getBusinessInfo().userId;
                    var pk_cust = null;
                    var accclass = null;
                    if (supplier_1 && objtypeValue == "1") {
                        pk_cust = supplier_1;
                        accclass = 3;
                    } else if (customer_1 && (objtypeValue == "0" || objtypeValue == "2")) {
                        pk_cust = customer_1;
                        accclass = 1;
                    } else if (psndoc) {
                        condition.pk_psndoc = psndoc;
                    }
                    if (objtypeValue == "3") {
                        condition.pk_psndoc = psndoc;
                        pk_cust = null;
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccPersonSqlBuilder';
                    } else if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        }
                    } else {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                    condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.itemKey = key;
                    condition.DataPowerOperationCode = 'fi';
                    condition.accclass = accclass;//3代表供应商
                    condition.pk_currtype = record.values.pk_currtype ? record.values.pk_currtype.value : null;
                    condition.pk_org = props.form.getFormItemsValue(that.formId, 'pk_org') ? props.form.getFormItemsValue(that.formId, 'pk_org').value : null;
                    condition.pk_cust = pk_cust;
                }
                return condition;
            }
            break;
        case 'recaccount'://收款银行账户
            // if (billType == 'F1' || billType == 'F3' || billType == "23E1") {
            //     var objtypeValue = record.values.objtype;
            //     if (objtypeValue.value == "1" || objtypeValue.value == "2") {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pub/CustBankAccGridRef/index'
            //         item.refName = that.state.json['public-000147']/* 国际化处理： 供应商银行账户*/
            //     } else if (objtypeValue.value == "3") {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pubinfo/PsnbankaccGridRef/index'
            //         item.refName = that.state.json['public-000148']/* 国际化处理： 个人银行账户*/
            //     } else {
            //         item.itemType = 'refer'
            //         item.refcode = 'uapbd/refer/pub/CustBankAccGridRef/index'
            //         item.refName = that.state.json['public-000149']/* 国际化处理： 客户银行账户*/
            //     }
            // }
            newRow.queryCondition = (p) => {
                let condition={};
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    //收款单和应收单
                    //付款单和应付单
                    if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                        }
                    } else {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccSubUseSqlBuilder';
                    }
                    condition.itemKey = key;
                    condition.DataPowerOperationCode = 'fi';
                    condition.refnodename = that.state.json['public-000150'];/* 国际化处理： 使用权参照*/
                    condition.pk_org = props.form.getFormItemsValue(that.formId, 'pk_org') ? props.form.getFormItemsValue(that.formId, 'pk_org').value : null;
                    condition.pk_currtype = record.values.pk_currtype ? record.values.pk_currtype.value : null;

                } else {
                    var objtypeValue = record.values.objtype.value;
                    var supplier_1 = record.values.supplier ? record.values.supplier.value : null;
                    var customer_1 = record.values.customer ? record.values.customer.value : null;
                    let psndoc = record.values.pk_psndoc ? record.values.pk_psndoc.value : getBusinessInfo().userId;
                    var pk_cust = null;
                    var accclass = null;
                    if (supplier_1 && (objtypeValue == "1" || objtypeValue == "2")) {
                        pk_cust = supplier_1;
                        accclass = 3;
                    } else if (customer_1 && objtypeValue == "0") {
                        pk_cust = customer_1;
                        accclass = 1;
                    } else if (psndoc) {
                        condition.pk_psndoc = psndoc;
                    }
                    if (objtypeValue == "3") {
                        condition.pk_psndoc = psndoc;
                        pk_cust = null;
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankaccPersonSqlBuilder';
                    } else if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        }
                    } else {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                    condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.pk_cust = pk_cust;
                    condition.itemKey = key;
                    condition.DataPowerOperationCode = 'fi';
                    condition.accclass = accclass;//3代表供应商
                    condition.pk_currtype = record.values.pk_currtype ? record.values.pk_currtype.value : null;

                }
                return condition;
            }
            break;
        case 'ordercubasdoc'://订单供应商(和供应商联动)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'freecust'://散户  根据供应商和客户判断可编辑性，根据供应商和客户过滤
            var supplier_2 = record.values.supplier ? record.values.supplier.value : null;
            var customer_2 = record.values.customer ? record.values.customer.value : null;
            let flag=false;
            if (supplier_2 != null || customer_2 != null) {
                ajax({
                    url: '/nccloud/arap/ref/freecustcontrol.do',
                    async: false,
                    data: {
                        supplier: supplier_2,
                        customer: customer_2
                    },
                    success: (res) => {
                        if (res.success) {
                            flag = res.data;
                        }
                    }
                })
            }
            if (flag) {
                newRow.queryCondition = (p) => {
                    if (flag) {
                        let condition={};
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.FreeCustSqlBuilder';
                        condition.itemKey = key;
                        condition.pk_org = record.values.pk_org.value;
                        if (supplier_2 != null) {
                            condition.customSupplier = supplier_2;
                        } else {
                            condition.customSupplier = customer_2;
                        }
                        condition.supplier = customSupplier;
                        condition.customer = customSupplier;
                        condition.crossRuleTableConditionsVO = '';
                        return condition;
                    }
                }
            }
            break;
        case 'checkelement'://责任核算要素(pk_pcorg如果利润中心不存在就不可编辑，如果利润中心存在，设置pk_org为利润中心)
            var pk_pcorg = record.values.pk_pcorg ? record.values.pk_pcorg.value : null;
            if (!pk_pcorg) {
                newRow.values = null;
            }
            newRow.queryCondition = (p) => {
                let condition={};
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.isShowDisabledData = false;
                //pk_org = pk_pcorg;
                condition.pk_profitcenter = pk_pcorg;
                return condition;
            }
            break;
        case 'project_task'://项目任务
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.ProjectTaskSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.ProjectTaskSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.ProjectTaskSqlBuilder';
                }
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.project = record.values.project ? record.values.project.value : null;
                return condition;
            }
            break;
        case 'costcenter'://成本中心
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CostCenterSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CostCenterSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CostCenterSqlBuilder';
                }
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org ? record.values.pk_org.value : null;
                return condition;
            }
            break;
        case 'project'://项目
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'material_src'://原始物料(同物料)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.MaterialGridSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_org = record.values.pk_org.value;
                condition.matcustcode = record.values.matcustcode ? record.values.matcustcode.value : null;//物料客户码，应收模块需要传值
                return condition;
            }
            break;
        case 'checktype'://票据类型
            //根据是否期初判断可编辑性
            var isinit_2 = props.form.getFormItemsValue(that.formId, 'isinit') ? props.form.getFormItemsValue(that.formId, 'isinit').value : null;
            if (isinit_2) { //如果是期初
                newRow.values[attrcode].value = null;
                break
            }
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.pk_curr = record.values.pk_currtype.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition. DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'checkno'://票据号
            // checkno不可编辑,并隐藏，编辑checkno_display
            newRow.values[attrcode].value = null;
            break;
        case 'checkno_display'://票据号
            // //根据是否期初判断可编辑性
            // var isinit_1 = props.form.getFormItemsValue(that.formId, 'isinit') ? props.form.getFormItemsValue(that.formId, 'isinit').value : null;
            // if (isinit_1) { //如果是期初
            //     newRow.values[attrcode].value = null;
            //     break
            // }
            // //如果票据类型未输入，票据号不可编辑
            // var checktype = record.values.checktype.value
            // if (!checktype) {
            //     newRow.values[attrcode].value = null;
            //     break
            // }
            // var billclass = props.form.getFormItemsValue(that.formId, 'billclass') ? props.form.getFormItemsValue(that.formId, 'billclass').value : null;
            // let needref = isChecknoRef(checktype, record.values.pk_org.value);
            // if (needref && item.itemtype != 'refer') {
            //     item.itemtype = 'refer';
            //     if (billclass == 'fk') {
            //         item.refcode = 'fbm/refer/fbm/Bill4CmpPayGridRef/index.js';
            //     } else if (billclass == 'sk') {
            //         item.refcode = 'fbm/refer/fbm/Bill4CmpReceiveGridRef/index.js';
            //     }
            //     reWriteCheckno(props, moduleId)
            //     newRow.queryCondition = (p) => {
            //         if (p) {
            //             if (p.refType == 'grid' || p.refType == 'gridTree') {
            //                 GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //             } else if (p.refType == 'tree') {
            //                 TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //             }
            //         } else {
            //             GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //         }
            //         UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //         itemKey = key;
            //         pk_org = record.values.pk_org.value;
            //         pk_curr = record.values.pk_currtype.value;
            //         fbmbilltype = record.values.checktype.value;
            //         if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
            //             DataPowerOperationCode = 'fi';

            //         } else {

            //         }
            //     }
            // } else if (needref && item.itemtype == 'refer') {
            //     newRow.queryCondition = (p) => {
            //         if (p) {
            //             if (p.refType == 'grid' || p.refType == 'gridTree') {
            //                 GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //             } else if (p.refType == 'tree') {
            //                 TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //             }
            //         } else {
            //             GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //         }
            //         UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
            //         itemKey = key;
            //         pk_org = record.values.pk_org.value;
            //         pk_curr = record.values.pk_currtype.value;
            //         fbmbilltype = record.values.checktype.value;
            //         if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
            //             DataPowerOperationCode = 'fi';

            //         } else {

            //         }
            //     }
            // } else {
            //     item.itemtype = 'input';
            //     item.refcode = null;
            // }
            break;
        case 'cbs'://CBS
            var project = record.values.project ? record.values.project.value : null;//项目
            if (!project) {//如果项目不存在，cbs不可编辑

            } else {//根据pk_org和项目去过滤(未完成)
                newRow.queryCondition = (p) => {
                    let condition={};
                    if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        }
                    }
                    condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.itemKey = key;
                    condition.pk_project = record.values.project.value;
                    condition.pk_org = record.values.pk_org.value;
                    condition.orgType = null;//null:pk_finaorg = pk_org
                    return condition;
                }
            }
            break;
        case 'settlemoney'://拉单金额编辑前控制
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'refuse_reason'://拒付理由的可编辑性
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'caltaxmny':
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'so_deptid'://业务部门(根据销售组织)   
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.so_org ? record.values.so_org.value : null;
                condition.busifuncode = 'all';
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    //收款单和应收单
                    condition.DataPowerOperationCode = 'fi';
                }
                return condition;
            }
            break;
        case 'so_deptid_v'://业务部门(根据销售组织)    
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.so_org ? record.values.so_org.value : null;
                condition.busifuncode = 'all';
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    //收款单和应收单
                    condition. DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'so_psndoc'://业务人员(根据销售组织)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.so_org ? record.values.so_org.value : null;
                condition.busifuncode = 'all';
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    //收款单和应收单
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pk_balatype'://结算方式(根据pk_billtype)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BalatypeSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.BalatypeSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BalatypeSqlBuilder';
                }

                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                condition.pk_billtype = record.values.pk_billtype ? record.values.pk_billtype.value : null;
                return condition;
            }
            break;
        case 'pu_org'://业务组织(业务单元（财务组织委托）) 
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                }
                condition.itemKey = key;
                condition.pkOrgs = record.values.pk_org.value;
                return condition;
            }
            break;
        case 'pu_org_v'://业务单元版本(财务组织委托)@auto zhangygw --- ok 
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                }

                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return  condition;
            }
            break;
        case 'bankrollprojet'://资金计划项目
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.BankRollProjetGridSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.BankRollProjetGridSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.BankRollProjetGridSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                return condition;
            }
            break;
        case 'so_deptid'://业务部门
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.pk_org = record.values.so_org ? record.values.so_org.value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'so_deptid_v'://业务部门
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.busifuncode = 'all';
                condition.pk_org = record.values.so_org ? record.values.so_org.value : null;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'so_org'://业务组织(业务单元（财务组织委托）) 
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                }

                condition.itemKey = key;
                condition.pkOrgs = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'so_org_v'://业务单元版本(财务组织委托)
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.OrgSqlBuilder';
                }

                condition.itemKey = key;
                condition.pkOrgs = record.values.pk_org.value;
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'sendcountryid'://发货国
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'rececountryid'://收货国
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F0") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pk_pcorg'://利润中心
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
               // pk_org = record.values.pk_org.value;
               condition.financeorg = record.values.pk_org.value;
               condition.isShowDisabledData = false;
               condition.DataPowerOperationCode = 'fi';
                return condition;
            }
            break;
        case 'pk_pcorg_v'://利润中心版本
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.ProfitcenterSQLBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.ProfitcenterSQLBuilder';
                    }
                } else {
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.ProfitcenterSQLBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                //pk_org = record.values.pk_org.value;
                condition.financeorg = record.values.pk_org.value;
                condition.isShowDisabledData = false;
                condition.DataPowerOperationCode = 'fi';
                condition.VersionStartDate = props.form.getFormItemsValue(that.formId, 'billdate') ? props.form.getFormItemsValue(that.formId, 'billdate').value : null;
                return condition;
            }
            break;
        case 'productline'://产品线
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                return condition;
            }
            break;
        case 'pk_currtype'://币种
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                return condition;
            }
            break;
        case 'cashaccount'://现金账户
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CashBankSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CashBankSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CashBankSqlBuilder';
                }

                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.pk_currtype = record.values.pk_currtype ? record.values.pk_currtype.value : null;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'commpayer'://承付人
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3") {
                    condition.DataPowerOperationCode = 'fi';
                }
                return condition;
            }
            break;
        case 'facard'://固定资产卡片号
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';

                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F1" || props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F3") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'payman'://支付人
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                if (props.form.getFormItemsValue(that.formId, 'pk_billtype').value == "F2") {
                    condition.DataPowerOperationCode = 'fi';
                } 
                return condition;
            }
            break;
        case 'pk_tradetypeid'://交易类型
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                condition.parentbilltype = props.form.getFormItemsValue(that.formId, 'pk_billtype').value;
                return condition;
            }
            break;
        case 'so_ordertype'://销售订单类型
            newRow.queryCondition = (p) => {
                let condition={};
                if (p) {
                    if (p.refType == 'grid' || p.refType == 'gridTree') {
                        condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    } else if (p.refType == 'tree') {
                        condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    }
                } else {
                    condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                }
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.pk_org = record.values.pk_org.value;
                condition.DataPowerOperationCode = 'fi';
                condition.parentbilltype = "30,32,38,4310,4331";
                return condition
            }
            break;
        case 'subjcode'://科目
            
                var pkAccountingbook = null;
                ajax({
                    url: '/nccloud/arap/arappub/arapQueryAccountBookAction.do',
                    data: {
                        pk_org: record.values.pk_org.value,
                    },
                    async: false,
                    success: (res) => {
                        if (res.success) {
                            pkAccountingbook = res.data;
                        }
                    }
                })
                let condition={};
                condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                condition.itemKey = key;
                condition.isLoadDetailInfo=true;//科目批改的时候需要传的
                condition.pk_accasoas=pk_accasoa;//选中的科目pk
                condition.pk_org = record.values.pk_org.value;
                condition.pk_accountingbook = pkAccountingbook;
                condition.dateStr = props.form.getFormItemsValue(that.formId, 'billdate') ? (props.form.getFormItemsValue(that.formId, 'billdate').value).substring(0, 10) : null;
                condition.DataPowerOperationCode = 'fi';
                newRow.queryCondition =  condition;
            break;
        default:
            if(column.refcode=="uapbd/refer/fiacc/AccountDefaultGridTreeRef/index"){//自定义项会计科目档案
                
                    let pkAccountingbook = null;
                    ajax({
                        url: '/nccloud/arap/arappub/arapQueryAccountBookAction.do',
                        data: {
                            pk_org: record.values.pk_org.value,
                        },
                        async: false,
                        success: (res) => {
                            if (res.success) {
                                pkAccountingbook = res.data;
                            }
                        }
                    })
                    let condition={};
                    condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.itemKey = attrcode;
                    condition.isLoadDetailInfo=true;//科目批改的时候需要传的
                    condition.pk_accasoas=pk_accasoa;//选中的科目pk
                    condition.pk_org = record.values.pk_org.value;
                    condition.pk_accountingbook = pkAccountingbook;
                    condition.dateStr = props.form.getFormItemsValue(that.formId, 'billdate') ? (props.form.getFormItemsValue(that.formId, 'billdate').value).substring(0, 10) : null;
                    condition.DataPowerOperationCode = 'fi';
                    newRow.queryCondition =condition;
            }else{
                newRow.queryCondition = (p) => {
                    let condition={};
                    if (p) {
                        if (p.refType == 'grid' || p.refType == 'gridTree') {
                            condition.GridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        } else if (p.refType == 'tree') {
                            condition.TreeRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                        }
                    }
                    condition.UsualGridRefActionExt = 'nccloud.web.arap.ref.before.CrossRuleSqlBuilder';
                    condition.itemKey = key;
                    condition.pk_org = record.values.pk_org.value;
                    return condition;
                }
            }
            break;
    }

}



export { onBatchChange }
/*SSVRjXkgvV55TIxKIO0zVzSkfDk5DdTUU1NkKDKy5OPH8BrE9PMqRF1vZnra6W8Z*/